package com.zmn.plat.services.interfaces.supplier;

import java.util.List;

import org.springframework.stereotype.Service;

import com.zmn.common.dto.StatusDTO;
import com.zmn.plat.model.entity.supplier.ScmSupplier;
import com.zmn.plat.model.entity.supplier.ScmSupplierQuery;
import com.zmn.plat.model.entity.supplier.ScmSupplierVO;

/**
 * 类描述： ScmSupplierService
 *
 * @author DaiZhichao
 * @since 2018/10/26 12:44
 */
@Service
public interface ScmSupplierService {

    /**
     * 描述:通过ID查供应商
     *
     * @param supplierId
     *            Integer
     * @return ScmSupplier
     * @author DaiZhichao
     * @since 2018/10/29 9:41
     */
    ScmSupplier findByKey(Integer supplierId);

    /**
     * 描述:通过ID查供应商VO
     *
     * @param supplierId
     *            Integer
     * @return ScmSupplierVO
     * @author DaiZhichao
     * @since 2018/10/29 9:41
     */
    ScmSupplierVO findVOByKey(Integer supplierId);

    List<ScmSupplier> listPageByQuery(ScmSupplierQuery query);

    List<ScmSupplierVO> listVOPageByQuery(ScmSupplierQuery query);

    Integer countByQuery(ScmSupplierQuery query);

    Integer isDuplicate(String name);

    Integer updateByKey(ScmSupplier scmSupplier);

    Integer updateStatus(ScmSupplier scmSupplier);

    Integer updateStatusBatch(StatusDTO dto);

    /**
     * 描述:修改排序，不会触发updater的更改
     *
     * @param scmSupplier
     *            ScmSupplier
     * @return Integer
     * @author DaiZhichao
     * @since 2018/10/26 12:45
     */
    Integer updateSort(ScmSupplier scmSupplier);

    Integer insert(ScmSupplier scmSupplier);

    Integer deleteByKey(Integer skuId);

}
